<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../style/css/layout.css" rel="stylesheet" type="text/css" />
<link href="../style/css/font.css" rel="stylesheet" type="text/css" />
<title><?php echo $user->name ?>XXX的个人主页</title>
</head>

<body>
<?php
	@session_start();
	$typeRole_Visitor = 0;//判断登陆的用户是企业用户还是毕业生用户
	$graduateId_Visited = 0;
	//判断是否登录
	if(!isset($_SESSION["Graduate_Id"]) || $_SESSION["Graduate_Id"] == null)
	{
		//非毕业生用户
		if(!isset($_SESSION["Company_Id"]) || $_SESSION["Company_Id"] == null)
		{
			/*非企业用户、未登录*/
			echo '<script>alert("请登录再进呐~~ ");window.location.href="../pages/login.php";</script>';
			exit();
		}
		else
		{
			//企业用户
			$typeRole_Visitor = 2;//2代表企业用户
		}
	}
	else
	{
		$typeRole_Visitor = 1;//1代表毕业生用户
	}
	/*已经登录*/
	//通过地址获取公司的id
	if(!isset($_GET["graduateId"]) || $_GET["graduateId"] == null)
	{
		//地址中并没有毕业生id
		
		if($typeRole_Visitor == 1)
		{
			//毕业生用户，则把被访问的毕业生id的默认改为本人的id
			$graduateId_Visited = (int)$_SESSION["Graduate_Id"];
		}
		else if($typeRole_Visitor == 2)
		{
			//公司用户，跳到公司自己的主页
			echo '<script>window.location.href="../company/index.php";</script>';
		}
		else
		{
			//什么都不是
			echo '<script>alert("请登录再进呐~~ ");window.location.href="../pages/login.php";</script>';
			exit();
		}
	}
	else
	{
		//已经登录，且地址栏中含有被访问的毕业生的id
		$graduateId_Visited = $_GET["graduateId"];
	}

	include("../class/user.class.php");
	$user = new User();
	$user->GetUserDataById($graduateId_Visited);
	require("../inc/top.php");
?>

<div class="mainpage_contain">
	<div class="mainpage_nav">
    	<div class="mainpage_title"><?php echo $user->name ?>的个人主页</div>
        <div class="mainpage_tab_contain">
			<?php  include("inc/tabs.php"); ?>
        </div>
    </div>
    
    <div class="mainpage_body">
    	<div class="mainpage_left">
        
        <div class="intro_contain">
        	<div class="intro_title">基本信息</div>
            <div>
                	<div class="intro_content">
                        <div>
                            <div class="intro_content_name">姓名：</div>
                            <div class="intro_content_data">
								<?php
									if($user->name != null) echo $user->name;
									else echo "未填写";
								?>
								</div>
                            <div class="clear"></div>
                        </div>
                        <div>
                            <div class="intro_content_name">现居地：</div>
                            <div class="intro_content_data">浙江·宁波</div>
                            <div class="clear"></div>
                        </div>
                        <div>
                          <div class="intro_content_name">户籍地：</div>
                            <div class="intro_content_data">浙江·宁波</div>
                            <div class="clear"></div>
                        </div>
					</div>
                    
                	<div class="intro_content">
                        <div>
                            <div class="intro_content_name">出生日期：</div>
                            <div class="intro_content_data">1991-1-1</div>
                            <div class="clear"></div>
                        </div>
                        <div>
                            <div class="intro_content_name">手机：</div>
                            <div class="intro_content_data">
								<?php
									if($user->mobile != null) echo $user->mobile;
									else echo "未填写";
								?></div>
                            <div class="clear"></div>
                        </div>
                        <div>
                            <div class="intro_content_name">邮箱：</div>
                            <div class="intro_content_data">
								<?php
									if($user->email != null) echo $user->email;
									else echo "未填写";
								?></div>
                            <div class="clear"></div>
                        </div>
					</div>
                    
                	<div class="intro_content">
                        <div>
                            <div class="intro_content_name">学校：</div>
                            <div class="intro_content_data">
								<?php
									if($user->school != null) echo $user->school;
									else echo "未填写";
								?></div>
                            <div class="clear"></div>
                        </div>
                        <div>
                            <div class="intro_content_name">专业：</div>
                            <div class="intro_content_data">
								<?php
									if($user->major != null) echo $user->major;
									else echo "未填写";
								?></div>
                            <div class="clear"></div>
                        </div>
                        <div>
                            <div class="intro_content_name">学历：</div>
                            <div class="intro_content_data">本科</div>
                            <div class="clear"></div>
                        </div>
					</div>
                <div class="clear"></div>
            </div>
            
            <div class="intro_title">教育经历</div>
      		<div>
                <div class="intro_content">
           	    	<div>
                   	  <div class="block"></div>
                        <div class="intro_content_ex">毕业院校</div>
                        <div class="intro_content_ex">就读时间</div>
                        <div class="intro_content_ex">专业</div>
                    <div class="intro_content_ex">学历</div>
                        <div class="clear"></div>
					</div>
                    <div>
               	    <div class="block"></div>
                        <div class="intro_content_dx">XX大学</div>
                        <div class="intro_content_dx">2010.9-2014.9</div>
                        <div class="intro_content_dx">计算机</div>
                        <div class="intro_content_dx">本科</div>
                        <div class="clear"></div>
					</div>
                    <div>
               	    <div class="block"></div>
                        <div class="intro_content_dx">XX中学</div>
                        <div class="intro_content_dx">2007.9-2010.9</div>
                        <div class="intro_content_dx">XXX</div>
                    <div class="intro_content_dx">高中</div>
                        <div class="clear"></div>
					</div>
                </div>
                <div class="clear"></div>
            </div>
            
            <div class="intro_title">项目经历</div>
            <div>
            	<div class="intro_content">
                	<div>
                    	<div class="block"></div>
                        <div class="intro_content_ex">项目名称</div>
                        <div class="intro_content_ex">起始时间</div>
                        <div class="intro_content_ex">担任职务</div>
                        <div class="clear"></div>
                    </div>
                    <div>
                    	<div class="block"></div>
                        <div class="intro_content_dx">XXXX项目</div>
                        <div class="intro_content_dx">XXX-XXX-XXX</div>
                        <div class="intro_content_dx">技术总监</div>
                        <div class="clear"></div>
                    </div>
                    <div>
                    	<div class="block"></div>
                        <div class="intro_content_dx">XXXX项目</div>
                        <div class="intro_content_dx">XXX-XXX-XXX</div>
                        <div class="intro_content_dx">技术总监</div>
                        <div class="clear"></div>
                    </div>
                    <div>
                    	<div class="block"></div>
                        <div class="intro_content_dx">XXXX项目</div>
                        <div class="intro_content_dx">XXX-XXX-XXX</div>
                        <div class="intro_content_dx">技术总监</div>
                        <div class="clear"></div>
                    </div>
                    <div>
                    	<div class="block"></div>
                        <div class="intro_content_dx">XXXX项目</div>
                        <div class="intro_content_dx">XXX-XXX-XXX</div>
                        <div class="intro_content_dx">技术总监</div>
                        <div class="clear"></div>
                    </div>
                    <div>
                    	<div class="block"></div>
                        <div class="intro_content_dx">XXXX项目</div>
                        <div class="intro_content_dx">XXX-XXX-XXX</div>
                        <div class="intro_content_dx">技术总监</div>
                        <div class="clear"></div>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            
            <div class="intro_title">校内奖励</div>
            <div>
            	<div class="intro_content">
                	<div>
                    	<div class="block"></div>
                        <div class="intro_content_ex">奖项名称</div>
                        <div class="intro_content_ex">获得时间</div>
                        <div class="intro_content_ex">学校</div>
                        <div class="clear"></div>
                    </div>
                    <div>
                    	<div class="block"></div>
                        <div class="intro_content_dx">XXXX奖项</div>
                        <div class="intro_content_dx">XXX-XXX-XXX</div>
                        <div class="intro_content_dx">宁波大学</div>
                        <div class="clear"></div>
                    </div>
                    <div>
                    	<div class="block"></div>
                        <div class="intro_content_dx">XXXX奖项</div>
                        <div class="intro_content_dx">XXX-XXX-XXX</div>
                        <div class="intro_content_dx">宁波大学</div>
                        <div class="clear"></div>
                    </div>
                    <div>
                    	<div class="block"></div>
                        <div class="intro_content_dx">XXXX奖项</div>
                        <div class="intro_content_dx">XXX-XXX-XXX</div>
                        <div class="intro_content_dx">宁波大学</div>
                        <div class="clear"></div>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            
            <div class="intro_title">校内职务</div>
            <div>
            	<div class="intro_content">
                	<div>
                    	<div class="block"></div>
                        <div class="intro_content_ex">职务名称</div>
                        <div class="intro_content_ex">担任时间</div>
                        <div class="intro_content_ex">学校</div>
                        <div class="clear"></div>
                    </div>
                    <div>
                    	<div class="block"></div>
                        <div class="intro_content_dx">XXXX职务</div>
                        <div class="intro_content_dx">XXX-XXX-XXX</div>
                        <div class="intro_content_dx">宁波大学</div>
                        <div class="clear"></div>
                    </div>
                    <div>
                    	<div class="block"></div>
                        <div class="intro_content_dx">XXXX职务</div>
                        <div class="intro_content_dx">XXX-XXX-XXX</div>
                        <div class="intro_content_dx">宁波大学</div>
                        <div class="clear"></div>
                    </div>
                    <div>
                    	<div class="block"></div>
                        <div class="intro_content_dx">XXXX职务</div>
                        <div class="intro_content_dx">XXX-XXX-XXX</div>
                        <div class="intro_content_dx">宁波大学</div>
                        <div class="clear"></div>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
        </div>    
        
		</div>
        <div class="mainpage_right">
        	<div class="avatar_contain">
				<img src="../images/12974102173752464b.gif" width="200" height="200" />
				<div class="vip">
					<?php if($user->JudgeGraduateAttest($graduateId_Visited) == 1) echo '<img src="../images/v.png">';?>
				</div>
			</div>
            <div class="avatar_chg"></div>
        </div>
        <div class="clear"></div>
    </div>
</div>

<?php
	require("../inc/copyright.php");
?>
</body>
</html>